# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=libgnome-games-support-2
pkgver=2.0.0
pkgrel=1
pkgdesc="Code shared between GNOME games"
url="https://gitlab.gnome.org/GNOME/libgnome-games-support"
arch=(loong64 x86_64)
license=(GPL3 LGPL3)
depends=(libgee gtk4)
makedepends=(vala git meson)
provides=("libgnome-games-support-${pkgver%%.*}.so")
options=(debug)
_commit=75ed95f923d77705d5cb5eea14625a655a3225c8  # tags/2.0.0^0
source=("git+https://gitlab.gnome.org/GNOME/libgnome-games-support.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd libgnome-games-support
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libgnome-games-support
}

build() {
  arch-meson libgnome-games-support build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
